﻿@page
@model IndexModel
@{
    ViewData["Title"] = "Home page";
}

<div class="text-center">
    <div class="m-1 p-1">
        <h3 class="display-4">
            欢迎
        </h3>
         <p>创建年轻人的<a href="https://www.yoyomooc.com">第一个 ASP.NET Core项目</a></p>
         <h4 class="bg-success text-xs-center p-1 text-white">@Model.Message</h4>

        <h4 class="bg-success text-xs-center p-1 text-white">服务器ID:@Model.Hostname</h4>
        <h1 class="bg-success text-xs-center p-1 text-white">@Model.DBHOST</h1>
         <table class="table table-sm table-striped">
            <thead>
                <tr><th>ID</th><th>名称</th><th>分类</th><th>价格</th></tr>
            </thead>
            <tbody>
                @foreach(var p in Model.Products){
                    <tr>
                        <td>@p.ProductID</td>
                        <td>@p.Name</td>
                        <td>@p.Category</td>
                        <td>@p.Price.ToString("F2")</td>
                    </tr>
                }
            </tbody>
         </table>
    </div>
</div>